import { Col, Row } from 'antd';
import { useRequest } from 'umi';
import { loadMdicMap } from '@/services/BaseLayout';
import { getTenantID } from '@/utils';
import { ILoadMapTypeAll } from '@/common';
import { RadioTags } from '../common/RadioTags';
import cls from 'classnames';
import pageStyles from '@/common/pageLayout.less';
const RestsInfoForm = ({ recordObj }: Record<string, any>) => {
  /**获取数据字典*/
  const loadMdicMapList = useRequest(() => {
    return loadMdicMap([`${getTenantID()}${ILoadMapTypeAll.PURCHASE_CATEGORY}`]);
  });

  /**列表*/
  const selectList = [
    {
      value: 0,
      name: '否',
    },
    {
      value: 1,
      name: '是',
    },
  ];
  /**是否委托招标代理机构*/
  const entrustFlagList = [
    {
      value: 0,
      name: '否',
    },
    {
      value: 1,
      name: '可选',
    },
    {
      value: 2,
      name: '必须',
    },
  ];
  return (
    <Row className={cls('ruleManange-radioTags', pageStyles['fromView-labelLength'])}>
      <RadioTags data={selectList} formName={'needIntentFlag'} formLabel={'是否意向公开'} isRules={true} defalultKeys={recordObj?.needIntentFlag || 0} />
      <RadioTags data={selectList} formName={'contractFlag'} formLabel={'是否需要签署合同'} isRules={true} defalultKeys={recordObj?.contractFlag || 0} />
      <RadioTags data={selectList} formName={'needProofFlag'} formLabel={'是否通过需求论证'} isRules={true} defalultKeys={recordObj?.needProofFlag || 0} />
      <RadioTags data={selectList} formName={'needStudyFlag'} formLabel={'是否通过可研报告'} isRules={true} defalultKeys={recordObj?.needStudyFlag || 0} />
      <RadioTags
        data={selectList}
        formName={'needProjectFlag'}
        formLabel={'是否通过项目建议书'}
        isRules={true}
        defalultKeys={recordObj?.needProjectFlag || 0}
      />
      <RadioTags data={selectList} formName={'needReviewFlag'} formLabel={'是否通过第三方评审'} isRules={true} defalultKeys={recordObj?.needReviewFlag || 0} />
      <RadioTags data={entrustFlagList} formName={'entrustFlag'} formLabel={'是否委托招标代理机构'} isRules={true} defalultKeys={recordObj?.entrustFlag || 0} />
    </Row>
  );
};
export { RestsInfoForm };
